package com.cvpoc.dto;

import java.io.Serializable;
import java.util.Date;

public class FormationProfessionnelleDTO implements Serializable {

	private static final long serialVersionUID = -272653274423897547L;
	
	private int id;
	private Date dateDebut;
	private int id_collaborateur;
	private int duree;
	private String libelle;

	public FormationProfessionnelleDTO(){
		super();	
	}

	public FormationProfessionnelleDTO(Date dateDebut, int duree, String libelle) {
		this.dateDebut = dateDebut;
		this.duree = duree;
		this.libelle = libelle;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Date getDateDebut() {
		return dateDebut;
	}

	public void setDateDebut(Date dateDebut) {
		this.dateDebut = dateDebut;
	}

	public int getDuree() {
		return duree;
	}

	public void setDuree(int duree) {
		this.duree = duree;
	}

	public String getLibelle() {
		return libelle;
	}

	public void setLibelle(String libelle) {
		this.libelle = libelle;
	}

	public int getId_collaborateur() {
		return id_collaborateur;
	}

	public void setId_collaborateur(int id_collaborateur) {
		this.id_collaborateur = id_collaborateur;
	}

	@Override
	public String toString() {
		return "FormationProfessionnelle [id=" + id + ", dateDebut="
				+ dateDebut + ", id_collaborateur=" + id_collaborateur
				+ ", duree=" + duree + ", libelle=" + libelle + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((dateDebut == null) ? 0 : dateDebut.hashCode());
		result = prime * result + duree;
		result = prime * result + id;
		result = prime * result + id_collaborateur;
		result = prime * result + ((libelle == null) ? 0 : libelle.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		FormationProfessionnelleDTO other = (FormationProfessionnelleDTO) obj;
		if (dateDebut == null) {
			if (other.dateDebut != null)
				return false;
		} else if (!dateDebut.equals(other.dateDebut))
			return false;
		if (duree != other.duree)
			return false;
		if (id != other.id)
			return false;
		if (id_collaborateur != other.id_collaborateur)
			return false;
		if (libelle == null) {
			if (other.libelle != null)
				return false;
		} else if (!libelle.equals(other.libelle))
			return false;
		return true;
	}

}
